package yunhe.service;

import yunhe.dao.NewsDao;
import yunhe.entity.News;
import yunhe.util.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;
import yunhe.dao.NewsDao;
import yunhe.entity.News;
import yunhe.util.SqlSessionFactoryUtil;

import java.util.List;

public class NewsService {
    SqlSession session = SqlSessionFactoryUtil.getSession();
    NewsDao newsDao = session.getMapper(NewsDao.class);

    public List<News> getAll() {
        return newsDao.getAll();
    }
}
